package com.atlin.project.model.vo;

import com.atlin.project.model.domain.BiTeam;
import com.atlin.project.model.domain.SysUser;
import com.atlin.project.model.vo.chart.ChartVO;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.Date;

/**
 * 团队实体VO
 *
 * @TableName biTeam
 */
@Data
public class BiTeamVO implements Serializable {

    
    /**
     * 团队ID
     */
    private Long id;

    /**
     * 图表信息
     */
    private ChartVO chartVO;

    /**
     * 创建用户
     */
    private SysUser createUser;

    /**
     * 入团密码
     */
    private String joinPassword;

    /**
     * 状态 0 - 正常 1 - 异常
     */
    private Integer status;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;
    

    /**
     * 包装类转对象
     *
     * @param biTeamVO
     * @return
     */
    public static BiTeam voToObj(BiTeamVO biTeamVO) {
        if (biTeamVO == null) {
            return null;
        }
        BiTeam biTeam = new BiTeam();
        BeanUtils.copyProperties(biTeamVO, biTeam);
        return biTeam;
    }


    /**
     * 对象转包装类
     *
     * @param biTeam
     * @return
     */
    public static BiTeamVO objToVo(BiTeam biTeam) {
        if (biTeam == null) {
            return null;
        }
        BiTeamVO biTeamVO = new BiTeamVO();
        BeanUtils.copyProperties(biTeam, biTeamVO);

        return biTeamVO;
    }

    private static final long serialVersionUID = 1L;
}